import Vue from 'vue'
import App from './App.vue'
import '@/assets/element-theme/index.css'
import router from "@/router";
import VueRouter from "vue-router";
import store from "@/store";
import {library} from '@fortawesome/fontawesome-svg-core'
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome'
// 商标图标库
import {faGithub} from '@fortawesome/free-brands-svg-icons'
// 普通的图标
import {
    faCog,
    faSignInAlt,
    faTimes,
    faPlay,
    faChevronRight,
    faHeart,
    faStepForward,
    faStepBackward,
    faPause,
    faRandom,
    faRetweet,
    faVolumeMute,
    faVolumeUp,
    faVolumeDown,
    faChevronUp,
    faChevronDown,
    faCopyright
} from '@fortawesome/free-solid-svg-icons'
// element组件
import {
    Row,
    Col,
    Container,
    Header,
    Main,
    Footer,
    Input,
    Avatar,
    Menu,
    MenuItem,
    Divider,
    Dialog,
    Button,
    Image,
    Select,
    Option,
    Carousel,
    CarouselItem,
    Form,
    FormItem,
    Message,
    Slider,
    Backtop,
    Loading,
    Autocomplete,
    Empty
} from "element-ui";

Vue.config.productionTip = false
// 配置路由
Vue.use(VueRouter)
// 使用fontawesome图标
library.add(faCog,
    faSignInAlt,
    faGithub,
    faTimes,
    faRetweet,
    faVolumeMute,
    faVolumeUp,
    faVolumeDown,
    faPlay,
    faRandom,
    faChevronRight,
    faHeart,
    faStepForward,
    faStepBackward,
    faPause,
    faChevronUp,
    faChevronDown,
    faCopyright
)
Vue.component('font-awesome-icon', FontAwesomeIcon)
// 使用element ui组件
Vue.use(Row)
Vue.use(Col)
Vue.use(Backtop)
Vue.use(Container)
Vue.use(Header)
Vue.use(Main)
Vue.use(Footer)
Vue.use(Input)
Vue.use(Avatar)
Vue.use(Menu)
Vue.use(MenuItem)
Vue.use(Divider)
Vue.use(Dialog)
Vue.use(Button)
Vue.use(Image)
Vue.use(Select)
Vue.use(Option)
Vue.use(Carousel)
Vue.use(CarouselItem)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Slider)
Vue.use(Loading)
Vue.use(Autocomplete)
Vue.use(Empty)
new Vue({
    render: h => h(App),
    beforeCreate() {
        Vue.prototype.$bus = this
        Vue.prototype.$message = Message
    },
    router,
    store
}).$mount('#app')
